#include <QApplication>

#include <QMutex>
#include <QObject>

#include "qmaingui.h"
#include "qmaincore.h"
#include "qmaincanvas.h"

#include "cell.h"

/*!
\mainpage CellMotility model
\author Bikulov Dmitry (bikulov.dmitry@gmail.com) (<A HREF="http://bikulov.org" TARGET="_top">bikulov.org</A>)\n
Copyright (c) 2010\n
\section Project on Google Code
Brouse source code using following link:\n
http://code.google.com/p/cellmotility/
*/

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    Q_INIT_RESOURCE(CellMotility);
    QMainCore *core = new QMainCore;
    QMainCanvas *canvas = new QMainCanvas(core);
    QMainGUI *gui = new QMainGUI(canvas, core);

    qRegisterMetaType<CELL>("CELL");
    QObject::connect(core, SIGNAL(cellChanged(CELL)), canvas, SLOT(setCell(CELL)));
    QObject::connect(core, SIGNAL(toggled()), gui, SLOT(externalToggleModelSlot()));

    gui->show();

    return app.exec();
}
